package com.erp.app.admin.projParam.vo;

import java.io.Serializable;
import java.util.ArrayList;

public final class ProjectParamsList implements Serializable {
	public ProjectParamsList() {

	}

	public ProjectParamsList(ArrayList projectParamsList) {
		setProjectParamsList(projectParamsList);
	}

	private ArrayList projectParamsList;

	public ArrayList getProjectParamsList() {
		return this.projectParamsList;
	}

	public void setProjectParamsList(ArrayList projectParamsList) {
		this.projectParamsList = projectParamsList;
	}

	public String getPrjParamValById(String paramId) {
		String paramVal = "";

		if (paramId == null)
			return paramVal;
		if (projectParamsList == null)
			return paramVal;

		int count = projectParamsList.size();

		for (int i = 0; i < count; i++) {
			ProjectParamVo vo = (ProjectParamVo) projectParamsList.get(i);
			if (vo == null)
				continue;

			if (paramId.equals(vo.getPrjParamId())) {
				paramVal = vo.getPrjParamVal();
				break;
			}
		}

		paramVal = (paramVal == null) ? "" : paramVal;

		return paramVal;
	}
}
